const http = require('http')

const server  = http.createServer((req,res)=>{
  const method = req.method
  let postDat = ''
  if (method === 'POST'){
    req.on('data',chunk=>{
      postDat += chunk.toString()
    })
    req.on('end',()=>{
      console.log(postDat)
    })
  }
})
server.listen(5000,()=>{
  console.log('running')
})